package com.westvalley.ctrl;

import com.jfinal.aop.Enhancer;
import com.jfinal.core.Controller;
import com.jfinal.ext.annotation.ControllerBind;
import com.westvalley.syn.service.HrDepartmentSerivce;
import com.westvalley.syn.service.HrJobTitleService;
import com.westvalley.syn.service.HrResourceService;
import com.westvalley.syn.service.HrSubCompanyService;
import com.westvalley.syn.service.HrJobActivitiesService;
import com.westvalley.syn.service.HrJobGroupService;
import com.westvalley.syn.service.HrJobTitleTempletService;
import com.westvalley.syn.service.SynService;

@ControllerBind(route="SynHrmCtrl")
public class SynHrmCtrl extends Controller{
	public void index(){
		renderJsp("/westvalley/synHrmData/synData.jsp");
	}
	
	/**
	 * 同步分部信息
	 */
	public void synSubCompany(){
		SynService service = Enhancer.enhance(HrSubCompanyService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * 同步部门信息
	 */
	public void synDepartment(){
		SynService service = Enhancer.enhance(HrDepartmentSerivce.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * 同步职务类型信息
	 */
	public void synJobGroups(){
		SynService service = Enhancer.enhance(HrJobGroupService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * 同步职务信息
	 */
	public void synJobActivities(){
		SynService service = Enhancer.enhance(HrJobActivitiesService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * 同步岗位模板信息
	 */
	public void synJobTitleTemplet(){
		SynService service = Enhancer.enhance(HrJobTitleTempletService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * 同步岗位信息
	 */
	public void synJobTitle(){
		SynService service = Enhancer.enhance(HrJobTitleService.class);
		renderJson(service.executeSynData());
	}
	
	/**
	 * 同步人员信息
	 */
	public void synResource(){
		SynService service = Enhancer.enhance(HrResourceService.class);
		renderJson(service.executeSynData());
	}
}
